import  { useEffect, useState } from 'react';
import { DotLoading } from 'antd-mobile'
import SkipButton from '../../components/SkipButton';
import GuidePage from '../../components/GuidePage';
import '../../css/SplashScreen.css'

function Logon() {
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    // 模拟加载过程，例如 API 请求等  
    const timer = setTimeout(() => {
      setLoading(false);
    }, 5000); // 5秒后隐藏启动页  

    return () => clearTimeout(timer); // 清理定时器  
  }, []);
  if (loading) {
    return (
      <>
        <div className="splash-screen">
          <SkipButton />
          <span style={{ fontSize: 50, position: "absolute", bottom: "0.7rem" }}>
            <DotLoading />
          </span>
        </div>

      </>
    );
  }

  return (
    <div>
      {/* 你的主要应用内容 */}
      <GuidePage />
    </div>
  );
}

export default Logon;
